www.gusucode.com > VC++ 打飞机游戏-源码程序 > VC++ 打飞机游戏-源码程序\code\src\CongraduationDlg.cpp
// CongraduationDlg.cpp : implementation file // Download by http://www.NewXing.com #include "stdafx.h" #include <mmsystem.h> #include "fighter.h" #include "CongraduationDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CCongraduationDlg dialog CCongraduationDlg::CCongraduationDlg(CWnd* pParent /*=NULL*/) : CDialog(CCongraduationDlg::IDD, pParent) { //{{AFX_DATA_INIT(CCongraduationDlg) m_strPercentage = _T(""); m_strName = _T(""); m_nBomb = 0; //}}AFX_DATA_INIT m_bSound = TRUE; } void CCongraduationDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CCongraduationDlg) DDX_Text(pDX, IDC_PERCENTAGE, m_strPercentage); DDX_Text(pDX, IDC_NAME, m_strName); DDX_Text(pDX, IDC_BOMB, m_nBomb); DDV_MinMaxInt(pDX, m_nBomb, 0, 100); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CCongraduationDlg, CDialog) //{{AFX_MSG_MAP(CCongraduationDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CCongraduationDlg message handlers BOOL CCongraduationDlg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here if(m_bSound)PlaySound("win.wav", NULL, SND_FILENAME|SND_ASYNC|SND_NODEFAULT); GetDlgItem(IDC_NAME)->SetFocus(); return FALSE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }